//
//  ViewController.swift
//  tryMenuScrollView
//
//  Created by ning on 2017/11/8.
//  Copyright © 2017年 ning. All rights reserved.
//

import UIKit

class ViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view, typically from a nib.
        let menuView = menuScrollView.init(frame: CGRect(x:0,y:64,width:self.view.frame.width,height:self.view.frame.height-64))
        let titleArray:[String]=["推荐","热点","新闻","事实","军事","娱乐","科技","农业"]
        menuView.initTitle(titleArr: titleArray)
        menuView.ClickSelectedButtonActionBlock = {[](button:UIButton) in
            print(button.titleLabel?.text ?? "")
        }
        self.view.addSubview(menuView)
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }


}

